import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';

export default async function a002(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const condition = fd.data.condition;
	//  删除排序
	const type = args[0].currentTarget.getAttribute('data-feidao-type');
	const key = args[0].currentTarget.getAttribute('data-feidao-key');
	if (type === 'order') {
		condition.order = {};
	} else if (type == 'param') {
		const params = condition.param;
		const _params = condition._param;
		delete params[key];
		delete _params[key];
	}
	await fd.data.refresh_filter_data(fd);
	await fd.data.refresh_data(fd);
}
